package tgc.edu.yzy.service;

import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.EimRole;
import tgc.edu.yzy.repostory.EimRoleRepository;

@Service
public class RoleService{
	@Autowired
	private EimRoleRepository baseDAO;
	
	public EimRole findById(Integer id) {
		Optional<EimRole> optional = baseDAO.findById(id);
		if(optional.isPresent()) {
			return optional.get();
		}
		return null;
	}
}
